package com.lqq.designPattern.behavioral_pattern.responsibility;

//小组长类（具体的处理者）
public class GroupLeader extends Handler {
    public GroupLeader() {
        //小组长处理1-3天的请假
        super(Handler.NUM_ONE, Handler.NUM_THREE);
    }

    @Override
    protected void handleLeave(LeaveRequest leave) {
        if (leave.getNum() <= this.numEnd) {
            System.out.println("小组长审批中...");
            System.out.println("请假内容：" + leave.getName() + "请假" + leave.getNum() + "天," + leave.getContent() );
            System.out.println("小组长同意请假！");
        }
        else {
            System.out.println("请假天数大于3，小组长无法审批，正在找上级：部门经理...");
        }
    }

}
